package Lab12;

import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;
import java.util.Date;

public class Ex12_6 {
    public static void main(String[] args) throws IOException {
        String fileName="src/Lab12/Exercise12_6.dat";
//        https://blog.csdn.net/cc1969281777/article/details/87068106
        ObjectOutputStream outputStream = new ObjectOutputStream(new FileOutputStream(fileName));
        int [] array=new int[]{1,2,3,4,5};
        Date date=new Date();
        double doubleVal=5.5;
        outputStream.writeObject(array);
        outputStream.writeObject(date);
        outputStream.writeDouble(doubleVal);
        outputStream.close();
    }
}
